#pragma once

struct tVector2
{
	float x;
	float y;
};

struct tVector3
{
	float x;
	float y;
	float z;
};

struct tVector4
{
	float x;
	float y;
	float z;
	float w;
};

struct tCharBuffer {
	char buffer[32];
};

struct tMatrix4
{
	float m11, m12, m13, m14,
	m21, m22, m23, m24,
	m31, m32, m33, m34,
	m41, m42, m43, m44;
};

#define MAX_TEXTURE_BYTES 512
/*
21 is the current summation of all possible elements
*/
#define MESH_DATA_SIZE	(21 * sizeof(float) * 3 * 50)
#define PROCEDURAL_DATA_SIZE	128
#define PROCEDURAL_DATA_COOKIE_LENGTH	128

class HeaderStructs {
public:
	struct tGeometryHeader
	{
		tCharBuffer target;
		u_int vertexFormat;
		u_int triangleCount;
	};
	
	struct tParameterHeader
	{
		tCharBuffer target;
		char shaderName[MAX_TEXTURE_BYTES];
		u_int featureSet;
		u_int inputSet;
		u_int sceneType;
	};

	struct tSurfaceTextureHeader
	{
		tCharBuffer target;
		tCharBuffer channel;
		u_int type;
	};

	struct tDeformationHeader
	{
		tCharBuffer target;
		bool isActive;
		float scale;
		u_int proceduralFormat;
	};
};

class DataStructs {

public:

	struct tTextureFile {

		u_int stage;
		char filename[MAX_TEXTURE_BYTES];
	};

	struct tNoise {

		float amplitude;
		u_int octaves;
		float scale;
		float offset;
	};

	struct tGrid {

		float contrast;
		float height;
		float width;
	};

	struct tChecker {

		float contrast;
	};

	struct tRamp {

		float wave;
	};

	struct tWood {

		float ageSpacing;
		float ageCount;
	};
};

class QuerysStructs {
public:

	struct tViewerInfoQuery
	{
		tCharBuffer target;
		int responceType;
	};

	struct tViewerGeometryInfoResponce
	{
		int triangleCount;
	};

	struct tViewerDeformationInfoResponce
	{
		bool isActive;
		float scale;
		int proceduralFormat;
	};

	struct tViewerTextureInfoResponce
	{
		char textureFilenames[3][MAX_TEXTURE_BYTES];
	};

	struct tViewerParameterInfoResponce
	{
		char shaderFilename[MAX_TEXTURE_BYTES];
		int shaderFeatureSet;
		int inputFeatureSet;
		int sceneType;
	};

	/*struct tViewerInstanceInfoResponce
	{
		bool childExists;
		int childTotalCount;
		tCharBuffer childMesh;
		tProceduralData childProcedrual;
	};*/
};